package main.java.design.builder;

import java.io.Reader;
import java.util.Properties;

/**
 * <p>
 *     构造一个使用Builder接口的对象
 * </p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/11 22:10
 */
public class Director {

    private Builder concreteBuilder = null;
    public Director(Builder concreteBuilder) {
        this.concreteBuilder = concreteBuilder;
    }

    public Product buildProduct() {
        concreteBuilder.setAddress();
        concreteBuilder.setPhone();
        return concreteBuilder.getProduct();
    }
}
